<%@ page import="java.util.Arrays" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>request_result.jsp</title>
</head>
<body>
<%
	String irum = request.getParameter("irum");
	String address = request.getParameter("address");
	double kor = Double.parseDouble(request.getParameter("kor"));
	double mat = Double.parseDouble(request.getParameter("mat"));

	double tot = kor + mat;
	double avg = tot / 2;
	
	//checkbox 처리
	String chk[] = request.getParameterValues("chk");

%>
	<div class=title>입력 결과 출력</div>
	<form id='fmr'>
		<ul>
			<li>Name : <%= irum %></li>
			<li>address : <%= address %></li>
			<li>kor : <%= kor %></li>
			<li>mat : <%= mat %></li>
			<li>tot : <%= tot %></li>
			<li>avg : <%= avg %></li>
			<li>hobby : <%=Arrays.toString(chk) %></li>
		</ul>
		<input type=button value="다시입력" id='returnBtn'
			onclick = "location.href='main.jsp?inc=./jsp/request.jsp'">
		
	</form>
</body>
</html>